home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-13
/
tpepkg.zip
/
TPE.DOC
< prev
next >
Wrap
Text File
|
1991-06-10
|
33KB
|
699 lines
----------------------------------------------------------------------------
TERMINAL PROCEDURES EDITOR AND DISPLAY MODULE DOCUMENTATION
VERSION 1.0 (BETA TEST)
June 8, 1991
----------------------------------------------------------------------------
Package information and goals:
------------------------------
Contents of this zipped package are: 1. A graphics editor
<TPE_ED.EXE> for the purpose of creating high resolution graphics
images similar to those contained in the volumes of U.S. TERMINAL
PROCEDURES. 2. A data file display module <TPE_DM.EXE> for viewing
completed images. 3. Five example image data files <SJC.TPE> -
<QUIET1.TPE> - <FROGO6.TPE> - <SJCAPT.TPE> and <USER.SHP>. 4. a
documentation file <TPE.DOC> which explains how to use the editor
and display module. I wrote this package to facilitate information
transfer between people who enjoy flying aircraft on computer flight
simulators. The coded images of SID plates - APPROACH plates and
AIRPORT DIAGRAM plates are of relatively small size and are transmitted
quickly over information networks.
Overview of the editor <TPE_ED.EXE>.
------------------------------------
The editor is capable of creating plate images in 16 colors. There
are three border types you can use. You can enter lines - circles and
shapes in graphics mode. There is a library of typical graphics shapes
which is user expandable. You can enter text from an altered/limited
character set of upper or lower case letters in text input mode. The
actual drawing area is 640 x 750 lines. The portion of the image off
the display screen is written to - or viewed - by scrolling. In graphics
mode - a bounded region fill routine is available - its capabilities are
limited. The editor is able to write or retreive image files to/from
disk storage. You can resume editing a saved image once it is re-loaded.
On SID plates you can store multiple pages of text info in the lower
pane. You can delete mistakes you make when editing. You will be
prompted via a selection menu for input and output file names.
Overview of the display module <TPE_DM.EXE>.
--------------------------------------------
The display module is capable of writing plate data image files to
the display screen. Once the file is showing on the screen you are able
to scroll the image up or down. All pages of text (5) in the bottom pane
of a SID type plate image are able to be displayed. This module should
be packaged with any image files you generate. You will be prompted via
a selection menu for input file names.
Example image file <SJCAPR.TPE>.
--------------------------------
This image is an approach plate for ILS Runway 12R at San Jose
International Airport. It does contain a few errors. Sorry!
Example image file <SJCAPT.TPE>.
--------------------------------
A diagram of San Jose Airport. This is incomplete and intended to
to show editor capabilities and limitations only. Even though I wrote
this thing - I am still learning how to use it.
Example image file <QUIET1.TPE>.
--------------------------------
A Standard Instrument Departure for San Francisco International
airport. I am pretty sure that this image has few or no informational
errors.
Example image file <FROGO6.TPE>.
--------------------------------
A Sacramento Metro SID. I used this image as a test of the delete
function. It's an added bonus! In ATP using IPS WEST you might have
some difficulty hanging on to MYV on 110.8! You will lose the signal
just before you intercept the R-154 radial!
Example user shape file <USER.SHP>.
-----------------------------------
An example user shape file. Thiss example file contains only one
shape. When the editor starts up it looks for a file of this name. If
it finds the file it will load the additional shape bit patterns in it
and make them avilable when you use the editor. Please read file format
information further down.
The documentation file <TPE.DOC>.
---------------------------------
Please TYPE out this file or make notes before running the editor
or you'll get lost. There is no on-line help in this version. I always
seem to find out that writing documentation is tougher than the actual
programming. Please excuse any mis-information or omissions.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Starting the editor:
--------------------
To start the editor just type TPE_ED <CR>. You should see an image
of a Boeing 747 on short final accompanied by the editor logo build up
on the screen. For the next few seconds the image will darken as night
falls. When those running lights are burning brite press any key to
clear the intro and bring up the main menu. All initial plate type
choices - file save/load operations and a display option are selected
from the main menu via function keys <F1> to <F10>.
Main menu choices:
------------------
<F1> Begin a new SID plate. Pressing this key will remove the main
menu from the screen and draw a two pane SID plate border. After the
border appears you can begin editing.
<F2> Begin a new AIRPORT DIAGRAM plate. Pressing this key will
remove the main menu and draw a one pane general border. Although this
is advertised as an AIRPORT DIAGRAM border - it is intended as a basis
for your own custom pane layouts. If you should do this please note the
section further down about cursor movement.
<F3> Begin a new approach plate. Pressing this key will remove the
main menu from the screen and draw a four pane APPROACH PLATE type
border.
<F4> Load and display an image file from disk storage. When the
file is loaded you can scroll the image. Display it from the top down
or from the bottom up. If it is a SID type plate you can scroll through
up to five pages of text in the bottom pane. Pressing the <ESC> key
will return you to the main menu. Use of this key disables editing
functions. It is intended to duplicate the actions of the display module
<TPE_DM.EXE>. If there are no files in the current directory with a
TPE extender then an error message will appear.
<F5> Load and display an image file from disk storage. Using this
key to load an image allows you to continue editing after the file is
loaded. Editing functions are fully functional after the image is up
on the display. You can add more items to the image. If there are no
files to be loaded with a TPE extender in the current directory an error
message will appear.
<F6> Save the current image to a disk file. If you press this key
the main menu will be replaced by a file name input box. You can enter
a filename of 8 characters or less. The editor will add a <TPE> extender
to the name you type. A check is made for duplicate filnames. An error
message will be generated if this occurs. If there is no information
in the display list to be saved an error message will also appear. You
can accumulate a display list 12K in length. Do not exceed this limit.
no check is made on size. It's really plenty of of space! Even very
cluttered SIDs are using only about 4k in this version.
<F7> Reserved for future expansion.
<F8> Reserved for future expansion.
<F9> Reserved for future expansion.
<F10> Quit the editor and return to DOS.
NOTE: To get back to the main menu at almost any any time press the
<ESC> key!
NOTE: As soon as the main menu disappears - all function keys are
redefined.
The STATUS LINE at the TOP of the display:
------------------------------------------
At the top of the display you can see information that will assist
you in editing. From left to right here is what you see: Two groups of
three digits each. This is the X-Y coordinates of the graphics cursor.
The graphics cursor is the small white dot a little farther down the
screen. The default position is 100 100. Directly after the coordinates
is a colored patch. This is the current drawing color. All lines -
circles - shapes - region fills - and text will be drawn in this color
until you change it! To the right of the color patch is the current
shape symbol. The default symbol is my representation of a VOR. Next
to the right is text stating the plate type you have selected. After
this comes the mode state. The default mode is <GR> - graphics entry
mode. The other available mode is <TX> - text entry mode. In certain
instances when in <TX> mode you will see a page indicator after the
mode state. It will look like this: <P#>. Understanding the status line
is the key to using the editor. In some instances - plate header text
will be apparently inter-mingled with status information. This only
happens when the editor is running. As you edit a plate image I would
suggest that the header text is the last thing you enter.
SHIFTING the IMAGE on the display:
----------------------------------
When you start editing an image - all you can see are the first
480 lines. To shift the image up and down use function keys <F7> <F8>
<F9> and <F10>. Keys F7 and F8 scroll the display up and down 20 lines
at a time. Function key F9 shows the image from the top down. Function
key F10 shows the image from the bottom up. HINT: If you are working
on the bottom section of an image the status line may not be visible.
Using <F9> can always give you a quick peek at it. <F10> will then
return you to the bottom section of the image.
Moving the DOT CURSOR:
----------------------
The DOT CURSOR is used to enter graphics information to the image.
1. It defines the start and end points of all lines. 2. It defines the
center of a circle and any point on its radius. 3. It defines the
location of a shape. 4. It defines the seed location for a region fill.
To move the DOT CURSOR use the UP/DOWN/LEFT/RIGHT arrow keys. Any
problem with movement check the <NUMLOCK> key. As you move the cursor
notice that the X-Y coordinates on the top status line are changing.
The cursor position is monitored and it will not be allowed to cross
any pane or border boundary lines. See below for - how to change panes.
You can move the cursor off the visible screen and still monitor its
movement using the X-Y coordinate information. Sometimes this comes in
handy.
Changing to the TEXT CURSOR:
----------------------------
To change to the text cursor press the <F2> key. The DOT CURSOR
will disappear and be replaced by a short horizontal line - this is
the TEXT CURSOR. Any text you type will appear ABOVE this cursor line
and as each character is typed the cursor will advance one position.
The text cursor position is monitored and - once again - it will not
be permitted to cross a pane or border boundary line. Its movements
are more jumpy than the DOT CURSOR'S so get used to it! Also look at
the status line on the top of the display to see that the mode has
changed from <GR> to <TX>. NOTE: The X-Y information is meaningless
when in text mode.
Changing back to the DOT CURSOR:
--------------------------------
Press <F2> again!
Moving the DOT CURSOR or TEXT CURSOR across a pane boundary:
------------------------------------------------------------
Press the <F5> key to shift the cursor - whatever its type - to
the next available pane. Repeated use of the <F5> key will cycle the
cursor through available panes. NOTE: As you cycle through available
panes notice that all three plate types have a NOT SO OBVIOUS PANE at
the top of the screen. There is room there for two lines of TEXT. This
is for creating the plate header. Be aware that although this
information is written over the status line - it will be displayed
properly on a finished image. In this version of the editor you can
see enough of what's going on to complete these two header lines
despite the status info. Version 2.0 will resolve this conflict.
Changing the drawing COLOR:
---------------------------
Press the <F1> key to cycle through available drawing colors.
The color patch on the status line will change to the new color. The
editor code modifys the VGA DAC color registers to provide a more
suitable color selection for drawing images. There are some dimmer
blues and greens intended for land and ocean filled regions on color
approach plates.
Changing the current SHAPE:
---------------------------
To change to the next available graphics shape press the <F4> key.
As the shape is changed the shape symbol on the status line will
reflect it. There are 24 shapes in the default library. When the
editor is started it looks for a file called <USER.SHP>. If it finds
this file - and it has the correct format - the user file shape data
is added to the default shape library. A maximum of 50 total shapes are
allowed. Shapes are 16 bits wide by 9 lines.
Drawing a SHAPE at the DOT CURSOR position:
-------------------------------------------
Shapes can only be drawn when in graphics <GR> mode! To draw the
current shape at the cursor position press the <F3> key. An attempt is
made to center the shape on the dots position. The shape will be drawn
in the current drawing color! NOTE: If the position of the DOT CURSOR
would cause the shape to cross a pane or border boundary it will not be
drawn. If this happens just move the dot in a couple of pixels and try
again!
Drawing a LINE:
---------------
Lines can only be drawn when in graphics <GR> mode! To draw a line
first specify its starting point by moving the DOT CURSOR with the
arrow keys then press the "s" key. Caps or lower case will not matter!
Now move the cursor to the line's end point and press the "e" key. A
line will connect the two points in the current drawing color. Notice
a small white dot was left at the start point for user reference.
A couple other important concepts: You can initiate a line at the
top of the screen by pressing the "s" key - then scroll the screen using
the <F7> <F8> <F9> <F10> keys so that the start point is no longer
visible and move the DOT CURSOR to this section of the screen and select
the line end point by pressing the "e" key. The line will connect the
two points with no problem. It's all one big drawing area!
You can cascade line entry. After you draw a line you can move the
dot cursor to the next line end point and press the "e" key. It is not
necessary to press the "s" key. This is useful for drawing coast lines
or curved lines. Then cascaded line can be of a different color if you
want. Use the <F1> key to select a new drawing color before you press
the "e" key.
Drawing a CIRCLE:
-----------------
Circles can only be drawn when in graphics <GR> mode! To draw a
circle - position the DOT CURSOR at the center of the circle and press
the "c" key. Now move the DOT CURSOR to any point on the radius of the
circle and press the "r" key. A circle will be drawn in the current
drawing color. Notice that the circle is clipped at pane and border
boundary lines. After you have selected a circle center and moved the
cursor to any point on the radius a white dot will be left at circle
center for user reference. The dot will still be there after the circle
drawn. This dot will not appear in a finished image.
Filling a REGION:
-----------------
This function is only intended for airport diagrams and approach
plates. It is NOT very smart. Several seeds may be necessary to fill
very irregular regions. It only fills BLACK areas. It will NOT fill
colored areas. Make sure the area you are filling is completely
bounded by some color other than black! Do fills early in your design
so that if it screws up - you can start over! Please read my fill
hints and suggestions below.
Now that the fill routine's limitations and hazards have been
explained! To fill a region place the DOT CURSOR at the SEED location
and press the "f" key. OFF SHE GOES! In the current drawing color.
Please practice with this a little before you use it a lot. I am
working on improvements.
Entering TEXT:
--------------
A BIG NOTE: This will be different from what you are used to because
of the way text records are stored in the display list in system RAM.
The carriage return key does NOTHING! To stop a text entry just press
any cursor movement arrow key. This closes out the record and starts
a new one whether it's a 1 character string or a multi character
string!
Make sure that you are in text <TX> mode. Remember the <F2> key
changes between text and graphics entry modes. Put the TEXT CURSOR
where you want to enter some text and start entering characters.
The only other key affecting text entry is the backspace key.
As soon as you type a character you may backspace it away. Backspace
only works until it reaches where you began typing a line of text.
Changing text pages in a SID bottom pane:
-----------------------------------------
If you are in text entry mode <TX> and you are editing a SID
type image and the text cursor is in the lower pane (three conditions).
You will be able to select five different pages in which to enter
text using the <PAGE UP> and <PAGE DOWN> keys. The default page is
number one. The top status line will show <P#> after the <TX> mode
indicator when this option is active.
About entering text:
--------------------
NOTE: Once you move the cursor - the text record is closed out in
display list RAM memory. A new one begins as soon as you type another
character. It takes a little getting used to. It's really easier this
way where there are lots of short little lines of text all over the
place.
BACKSPACE key:
--------------
NOTE: After you have started entering text characters the backspace
function is available. It will only backspace to the start of a line
of text characters and no further. If you just see the text cursor
by itself ready to start a line - the backspace will do nothing. There
is a backsapce BUG I know about in the program and have not as yet
fixed. If you type a line of text all the way to the right border -
further text entry becomes blocked - the only way to enter more text
at this point is to use one of the arrow keys and move the text cursor.
In this - border locked condition - the backspace key operates okay
but the text cursor and characters on the screen are not updated as
you backspace. Keep the text cursor away from the position adjoining
the right border and you will encounter no problems.
UNDOING what you have done:
---------------------------
When you are in graphics or text entry modes pressing the <F6>
key will remove the last item you entered from the image. This is
accomplished by resetting the EOF marker and then re-writing the image.
Multiple presses of the <F6> key should back you all the way through
the image to the first item you entered. Be nice! Try to validate each
item you enter. If you make a boo boo erase it and re-enter it. Once
you save a file you cannot back past the original EOF. If you add more
display list items you will be able to delete back through the added
records only.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
ADDITIONAL INFORMATION AND NOTES
Starting the DISPLAY MODULE:
----------------------------
To start the display module just type TPE_DM <CR>. A small menu
will appear asking for the name of the file to load and display. If
the internal file header indicates an incorrect format - it will not
be loaded. Once the file is validated and loaded - the image will be
displayed.
SHIFTING the image:
-------------------
There is a subtle difference between shifting the image here and
on the editor. To scroll the image up or down 20 lines at a time use
the <UP> <DOWN> arrow keys. To view the image from the top-down press
the <HOME> key. To view the image from the bottom-up press the <END>
key. If this image is a SID plate with 5 pages of text in the bottom
pane - pressing the <PAGE UP> or <PAGE DOWN> keys will cycle through
the pages.
CHOOSING an input file:
-----------------------
When the load menu appears use the spacebar to cycle through all
available files with TPE extenders. When you get the one you want in
the red window press the carriage return key. That fille will be
loaded and displayed. If the message "NO TPE FILES" appears in the red
window - it means that no valid image files were found! Press any key
to return to DOS.
EXITING the display module.
---------------------------
If you decide not to load an image and want to quit to DOS just
press the ESC key.
INCLUDING display module with image files:
------------------------------------------
It is intended that the display module (only about 6K of code)
be packaged up with any image files - and used for viewing them. So
if you create an approach plate for your favorite airport and transfer
it around - please zip up the display module with it!
INCLUDING the file USER.SHP:
---------------------------
If you use an expanded shape library when drawing your image please
include your file <USER.SHP> with the image file. The editor or the
display module look for this file when they start up and will load its
contents. If you try to display an image using an expanded shape
library and this file is missing - any expanded shapes used in the image
will NOT be written. I had intended to include the shape library -
default or expanded - with each image. Maybe in V2.0.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
EXPLANATION OF THE FILE FORMAT FOR THE DISPLAY LIST
The first three bytes of the file are <TPE>. This will act as kind
of pre-filter to exclude files which do not contain display list data.
The next word (2 bytes) in the file is the border type number. This
indicates to the display processor what type of border and pane layout
to draw and which set of cursor movement minimums and maximums to load.
The min/max is also used to determine circle clipping.
Next follows a sequence of records of different formats and lengths.
They are read and processed by the display processor sequentially.
After all the display records comes a single byte <0FFH>. This indicates
the end of all display records. Hope it's always there! Disaster is
guaranteed if this record termination byte is missing.
Lines - circles - shapes - and region fill seeds are all fixed length
records. Text records are of variable length. Record types can occur in
any order. Once again I mention that records are processed sequentially.
A record begins with a code byte indicating what type of record it is.
The display processor reads this byte to determine how to process the
record. All coordinate data is 16 bit word integer type.
line record format:
-------------------
<DB> --- code byte 000h - indicates that this is a line record.
<DW> --- line begin x-coordinate
<DW> --- line start y-coordinate
<DW> --- line end x-coordinate
<DW> --- line end y-coordinate
<DB> --- line color
<DB> --- line style
circle record format:
---------------------
<DB> --- code byte 001h - indicates that this is a circle record.
<DW> --- circle center x-coordinate
<DW> --- circle center y-coordinate
<DW> --- circle variable a
<DW> --- circle variable b
<DW> --- dcx max clip value
<DW> --- dcy max clip value
<DW> --- dcx min clip value
<DW> --- dcy min clip value
<DB> --- circle color
shape record format:
--------------------
<DB> --- code byte 002h - indicates that this is a shape record.
<DW> --- shape x-coordinate
<DW> --- shape y-coordinate
<DW> --- shape number
<DB> --- shape color
region fill record format:
--------------------------
<DB> --- code byte 003h - indicates that this is a region fill record.
<DW> --- fill seed x-coordinate
<DW> --- fill seed y-coordinate
<DB> --- seed color
text record format:
-------------------
<DB> --- code byte 004h - indicates that this is a text record.
<DW> --- x-coordinate of upper left bit of string start
<DW> --- y-coordinate of upper left bit of string start
<DW> --- count of actual characters in the string
<DW> --- page number of text string (0) or (1-5)
<DB> --- text color
<DB> --- text character ....... until count is reached!
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
EXPLANATION OF THE FILE FORMAT FOR A USER SHAPE FILE
The first three bytes of the file must be ASCII letters <TPE>. The
next byte is an 8 bit integer that describes how many new additional
shapes are contained in the file. Next follows bytes describing the
bit pattern of the shape. Shapes are 16 bits wide by (9) lines. Thus
- each shape will be represented by 18 bytes. The number of shapes
loaded is limited during the file read. If you think you can specify
300 different shapes - WRONG! - you are limited to 50 total! Default
plus user. There is a file included in the package called <USER.SHP>
use DEBUG or something like that to examine its contents. I was going
to write a shape editing package similar to windows icon editors but
right now I do not have the time!
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
A FEW TIPS AND HINTS FOR DRAWING IMAGES
1. Even at 640 X 480 VGA resolution images can become cluttered quickly!
Make images of the less complicated plates at first. Even then - you
might have to use a little license and even leave something out to make
them look good. The coding in the editor is open ended so I might try
for increased resolution graphics modes in some future version.
2. Remember that the region fill routine is only capable of filling
(black) colored areas. A great example of what can happen is my stellar
example of the San Jose Airport diagram - although it's not complete -
I decided to include it as a perfect example of what not to do. Notice
that I filled (green) then drew a building outline in (yellow) on the
left side and could not fill it with (yellow). Plan your fills carefully.
Another hint - DO NOT add text or shapes before you fill regions. If you
do - you will end up dropping RF seeds everywhere to get solid colors
where you want them. I included the fill routine primarily for approach
plates and airport diagrams.
3. Use the subdued fill colors for land areas and water. This makes the
brighter colors for course lines and text really stand out!
4. To draw a runway - use the line cascade feature. First draw a line
representing one side of the runway. Shift the dot cursor in X-Y to the
opposite side at the same end and press the "e" key. Remember how many
pixels you shifted in x and y. Now move the dot cursor back to the
start point and then shift it the same number of pixels in x-y as you
did at the bottom and press the "e" key again. You get two nice parallel
lines. Then just connect the last two line ends.
5. As you construct images - use a plastic triangle and ruler to get
better orientation of angles and lines on the display. I have found
a ruler scaled in millimeters to be particularly useful. In the Terminal
Procedures Publication an approach plate diagram box is usually 120 X
120 MM. In this area on the display x varys from 1 to 638 and y varys
from 20 to 465. So we arrive at scaling factors of (5.32) pixels per MM
in (X) and (3.72) pixels per MM in (Y). I use a small programmable
calculator for quick conversions.
6. Enter minimums text in the lower section of an approach plate first!
Draw the separation lines afterward. Remember that the text cursor
movement is jumpy and limited by pane and border boundary lines.
Sometimes there are areas where you can't get the cursor to!
7. When you enter text near the right side of the image. Position the
cursor next to the border and move it towards the left using the arrow
key and count the message backward including spaces. Then type the
text towards the right. This way everything will fit with no surprises.
REMEMBER: No carriage return key is used.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
NOTES:
The program uses graphics mode 012H ( 640 x 480 VGA 16 colors )
exclusively. I'm not really sure how much video memory is required
to run this program. Certainly more than 64K. My apologies for not
knowing this info.
I have had a report of a problem with an ATI VGA WONDER display
card when running a program using techniques that this program
uses! I have no idea why! If you should sucessfully run this
editor and display module on this display adaptor please let me
know and thanks!
I have tested the editor on every display adaptor I have access
to. It has run okay on the following:
DIAMOND SPEEDSTAR -
PARADISE VGA PLUS 16 -
VIDEO-7 1024i/512K -
NORTHGATE VGA -
3 OTHER ANONYMOUS DISPLAY ADAPTORS -
My apologys if this does not run on your adaptor - I programmed
for a long time on a IBM CGA waiting for a "STANDARD" to emerge
and it looks like here we go again! Just look at the number of
configuration files that come with GIF viewers to see what I mean!
These programs are distributed under the NO WARE concept. I'll let
you know when I figure out what that means! In any event do not
hesitate to distribute them - no strings attached! Have fun. Enjoy
flying! I expect to see some really crazy approaches and departures
from all this - also a few things I haven't even anticipated! Your
comments - observations and ideas are always welcome. I am about
to embark on my "DAY" job in the merchant marine for about the next
4 months - so if any major problems develop with the software -
please be patient. The "BOX" is going with me on the ship and rest
assurred I will be working on version 2.0 during my time off.
JIM DUKAT
74040,1573